//package org.karelun.rabbit.rcp.command;
//
//import org.eclipse.gef.commands.Command;
//import org.karelun.rabbit.graph.Connection;
//import org.karelun.rabbit.graph.Diagram;
//import org.karelun.rabbit.graph.Shape;
//
//public class DeleteConnectionCommand extends Command {
//	
//	private Diagram diagram;
//	
//	private Connection connection;
//	
//	private Shape sourceShape;
//	
//	private Shape targetShape;
//	
//	public DeleteConnectionCommand(Connection connection) {
//		this.connection=connection;
//		sourceShape=connection.getSourceShape();
//		targetShape=connection.getTargetShape();
//		this.diagram=(Diagram)connection.eContainer();
//	}
//	
//	@Override
//	public void execute() {
//		connection.setSourceShape(null);
//		connection.setTargetShape(null);
//		diagram.getConnections().remove(connection);
//	}
//	
//	@Override
//	public void undo() {
//		diagram.getConnections().add(connection);
//		connection.setSourceShape(sourceShape);
//		connection.setTargetShape(targetShape);
//	}
//
//}
